package com.idc.quotation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.idc.quotation.entity.ClassSysVerModel;
import com.idc.quotation.entity.SystemClassification;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SystemClassificationMapper extends BaseMapper<SystemClassification> {
    @Select("select cla.id as classId,cla.system_classification_name as className,sys.id as sysid,sys.system_name as sysName" +
            ",ver.id as versionId,ver.version as version,ver.applicable_scene as applicableScene,ver.applicable_net_type as applicableNetType," +
            "ver.applicable_net_type_name as applicableNetTypeName,ver.fun_desc as funDesc,mo.id as modelId,mo.model_name modelName," +
            "mo.model_desc as modelDesc,mo.model_config as modelConfig,mo.model_unit as modelUnit,mo.model_price as modelPrice " +
            "from t_ykx_quotation_system_classification cla inner join t_ykx_quotation_system sys on cla.id=sys.system_classification_id " +
            "inner join t_ykx_quotation_system_version ver on ver.system_id =sys.id inner join t_ykx_quotation_sys_ver_model mo " +
            "on mo.version_id = ver.id ;")
    public List<ClassSysVerModel> queryQuotationInfo();
}
